package org.dromara.iot.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.iot.domain.IotElevatorFault;

import java.util.Date;

/**
 * 电梯故障业务对象 iot_elevator_fault
 *
 * @author lsl
 * @date 2024-06-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = IotElevatorFault.class, reverseConvertGenerate = false)
public class IotElevatorFaultBo extends BaseEntity {

    /**
     * 故障ID
     */
    @NotBlank(message = "故障ID不能为空", groups = {EditGroup.class})
    private String faultId;

    /**
     * 关联电梯ID
     */
    @NotNull(message = "关联电梯ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long elevatorId;

    /**
     * 电梯名称
     */
    @NotBlank(message = "电梯名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String elevatorName;

    /**
     * 故障单号
     */
    @NotBlank(message = "故障单号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String faultCode;

    /**
     * 维修单号
     */
    @NotBlank(message = "维修单号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String repairOrder;

    /**
     * 派单人
     */
    @NotBlank(message = "派单人不能为空", groups = {AddGroup.class, EditGroup.class})
    private String dispatchPeople;

    /**
     * 派单时间
     */
    @NotNull(message = "派单时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date dispatchDate;

    /**
     * 上报类型(0:人工上报;1:智能设备;2:微信上报)
     */
    @NotBlank(message = "上报类型(0:人工上报;1:智能设备;2:微信上报)不能为空", groups = {AddGroup.class, EditGroup.class})
    private String reportType;

    /**
     * 上报时间
     */
    @NotNull(message = "上报时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date reportTime;

    /**
     * 故障类型(0:不关门;1:非平层停靠;2:开门运行;3:运行超速;4:冲顶;5:蹲底;6:反复开关门)
     */
    @NotBlank(message = "故障类型(0:不关门;1:非平层停靠;2:开门运行;3:运行超速;4:冲顶;5:蹲底;6:反复开关门)不能为空", groups = {AddGroup.class, EditGroup.class})
    private String faultType;

    /**
     * 故障描述
     */
    @NotBlank(message = "故障描述不能为空", groups = {AddGroup.class, EditGroup.class})
    private String faultMessage;

    /**
     * 故障图片
     */
    @NotBlank(message = "故障图片不能为空", groups = {AddGroup.class, EditGroup.class})
    private String faultImage;

    /**
     * 故障楼层
     */
    @NotBlank(message = "故障楼层不能为空", groups = {AddGroup.class, EditGroup.class})
    private String faultFloor;

    /**
     * 清除时间
     */
    @NotNull(message = "清除时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date removeTime;

    /**
     * 故障时长
     */
    @NotBlank(message = "故障时长不能为空", groups = {AddGroup.class, EditGroup.class})
    private String faultDuration;

    /**
     * 处理状态(0:自清除;1:已派单;2:使用不当;3:开始维修;4:已修复;5:设备问题)
     */
    @NotBlank(message = "处理状态(0:自清除;1:已派单;2:使用不当;3:开始维修;4:已修复;5:设备问题)不能为空", groups = {AddGroup.class, EditGroup.class})
    private String disposeState;

    /**
     * 处理人
     */
    @NotBlank(message = "处理人不能为空", groups = {AddGroup.class, EditGroup.class})
    private String disposeMan;

    /**
     * 处理人头像
     */
    private Long disposeAvatar;

    /**
     * 处理时间
     */
    @NotNull(message = "处理时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date disposeDate;

    /**
     * 处理意见(0:使用不当;1:需要维修;2:设备问题;)
     */
    @NotBlank(message = "处理意见(0:使用不当;1:需要维修;2:设备问题;)不能为空", groups = {AddGroup.class, EditGroup.class})
    private String disposeOpin;

    /**
     * 是否大修（N.否，Y.是）
     */
    @NotBlank(message = "是否大修（N.否，Y.是）不能为空", groups = {AddGroup.class, EditGroup.class})
    private String isOverhaul;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = {AddGroup.class, EditGroup.class})
    private String remark;


}
